package com.ruoyi.constant;

/**
 * @program: ruoyi
 * @description: 合法性判定
 * @author: xpq
 * @create: 2022-12-21 11:22
 **/
public enum RwhfxpdEnum {
    HF(1, "合法"),
    WF(2, "违法"),
    WBH(3, "伪变化"),
    QT(4, "其他"),
    WG(5, "违规");



    private Integer code;
    private String desc;

    RwhfxpdEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(Integer code) {
        for (RwhfxpdEnum value : RwhfxpdEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return null;
    }
}
